import { createStore } from 'vuex';

import createPersistedState from 'vuex-persistedstate';

export default createStore( {
  state: {
    token: '',
    menuPath: ''
  },
  getters: {},
  mutations: {
    SAVE_TOKEN: ( state, payload ) => state.token = payload,
    SAVE_MENUPATH: ( state, payload ) => state.menuPath = payload

  },
  actions: {},
  modules: {},
  plugins: [
    createPersistedState()
  ]
} )